1. Field of the Invention
The present invention relates to a structured document conversion apparatus, a structured document conversion method, and a storage medium. In particular, the present invention is suitable for converting a structured document.
2. Description of the Related Art
Microsoft Windows Vista® is an operating system (OS) distributed by Microsoft. Windows Vista® supports Extended Markup Language (XML) Paper Specification (XPS), which is a new XML-based document format. An XPS document has a document format including three hierarchical layers called FixedDocumentSequence, FixedDocument, and FixedPage. XML documents containing print attributes referred to as print tickets, can be associated with nodes of each hierarchical layer. A job level print ticket is associated with FixedDocumentSequence. A document level print ticket is associated with FixedDocument1. A page level print ticket is associated with FixedPage1. Since the print ticket can be specified for each node of each hierarchical layer, an XPS document can change, for example, an output size for each FixedPage, or staple setting for each FixedDocument.
The XPS document has an aspect of a control language such as a print spooler format used during printing or a Page Description Language (PDL), and another aspect of an ordinary document. Regarding the document aspect, the XPS document can be used as a document format for saving, reusing, publishing, and distributing various documents, in the same manner as a Portable Document Format (PDF) file distributed by Adobe Systems Incorporated. The XPS document can retain a print ticket for each node of the hierarchical layers, and as a result, it is possible to create and distribute XPS documents associated with print settings (print attributes).
After the release of Windows Vista®, there are printing apparatuses that can directly print XPS documents in PDL. Such printing apparatuses print XPS documents using a printer driver that generates XPS documents. Printing can be performed by directly inputting an XPS document that has been generated, published, and distributed.
The XPS document includes print setting data and drawing data, and is utilized in applications and in printing apparatuses. However, handling of print settings (print attributes) described in a print ticket depends on an apparatus or device processing the XPS document. For example, a print ticket that cannot be processed by a printing apparatus is ignored by the printing apparatus.
To avoid the situation where a print ticket cannot be processed, there is a method in which a print driver or a print utility generates new printing data by combining a print ticket that cannot be processed by a printing apparatus with drawing data, so that the printing apparatus can process the print ticket (refer to Japanese Patent Application Laid-Open No. 2007-164444).
There is a method in which, when an application copies or edits a portion of a document, an order of priority is set to print attributes associated with each node, so that print attributes are replaced according to the nodes of the hierarchical layers (refer to Japanese Patent Application Laid-Open No. 2003-162519).
Although the methods discussed in Japanese Patent Application Laid-Open No. 2007-164444 and Japanese Patent Application Laid-Open No. 2003-162519 generate a new document by processing the print attributes, the new document remains dependent on the apparatus or device processing the document.
The method discussed in Japanese Patent Application Laid-Open No. 2007-164444 changes a document to a form in which print attributes added to the document can be processed by the printing apparatus. As a result, when a document is directly printed by the printing apparatus, the output is in the intended format. However, if the document is printed by a printing apparatus with different functions, or if content of the document is confirmed as an ordinary document by a different application, the format of the document changes.
In the method discussed in Japanese Patent Application Laid-Open No. 2003-162519, a specific application interprets the print attribute added to the nodes and replaces the print attributes for each layer by setting an order of priority according to the processes. However, the generated document cannot maintain a similar format when processed by a general application. In particular, if the document is a structured document in which a print attribute is added to each layer, it may be necessary to understand the entire layer structure of the document to perform an appropriate process.
For example, only a job level print ticket of the FixedDocumentSequence can be edited and processed via a print setting screen of a general printer driver. Therefore, when specifying a color/monochrome print setting or a print paper size setting, a job level print ticket is acquired and processed. If a print attribute such as monochrome printing is embedded in a page level print ticket added to a specific FixedPage, there is no guarantee that the printing apparatus will print the page in monochrome. General applications often determine only a job level print ticket that can be acquired without understanding a structure of the document and identifies a paper size to be displayed.
When an XPS document is to be used as a print document, print attributes are generated so that functions of a specific printing apparatus can be used. However, if the XPS document is utilized as an ordinary document, or as a print document on a different printing apparatus, the printing format may change. As a result, a user using the XPS document in various applications and printing apparatuses may obtain inconsistent results.